/*
2021-7-23
https://www.acwing.com/problem/content/3780/
*/
#include<cstring>
#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;
int n;

void turn(char &c)
{
    if(c=='W') c='B';
    else c='W';
}

bool check(string s,char c)
{
    vector<int>res;
    for(int i=0;i+1<n;i++)
    {
        if(s[i]!=c)
        {
            turn(s[i]);
            turn(s[i+1]);
            res.push_back(i+1);
        }
    }
    if(s.back()!=s[0]) return false;
    
    cout<<res.size()<<endl;
    for(auto t:res) cout<<t<<' ';
    if(res.size()) cout<<endl;
    
    return true;
}

int main()
{
    int T;
    cin>>T;
    while(T--)
    {
        string s;
        cin>>n>>s;
        if(!check(s,'W') && !check(s,'B')) puts("-1");
    }
    return 0;
}
